﻿
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="oprrecord.aspx.cs" Inherits="oprrecord" %>

<%@ Register Src="head.ascx" TagName="Head" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>服务器操作记录工具</title>
   <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div  width=100% style="vertical-align: middle; text-align: center">
    <form id="form1" runat="server">
     <table width="100%" border="0">
       <tr>
       <td style="height: 53px">
        <uc1:Head ID="Head2" runat="server" />
    </td>
       </tr>
    <tr>
    <td style="font-size: 15px">
        <br />
        操作记录列表<br />
        &nbsp;<br />
        服务器：<asp:DropDownList ID="server" runat="server" DataTextField="name" DataValueField="Server_id">     
        </asp:DropDownList>
        &nbsp;&nbsp;操作类型：<asp:DropDownList ID="status" runat="server">
            <asp:ListItem Value="0">无意外</asp:ListItem>
            <asp:ListItem Value="1">失败回滚</asp:ListItem>
            <asp:ListItem Value="2">服务器5分钟内故障</asp:ListItem>
            <asp:ListItem Value="3">服务器半小时内故障</asp:ListItem>
            <asp:ListItem Value="4">服务器一小时内故障</asp:ListItem>
        </asp:DropDownList>
        &nbsp; 操作人：<asp:DropDownList ID="checkuser" runat="server" DataTextField="User_name" DataValueField="User_id">
        </asp:DropDownList>
        <asp:Button ID="Button1" runat="server" Text="搜索" OnClick="Button1_Click" /><br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowEditing="GridView1_RowEditing" Width="967px" OnRowDeleting="GridView1_RowDeleting">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="work_id" DataNavigateUrlFormatString="OprrecordDetail.aspx?work_id={0}"
                    DataTextField="work_id" HeaderText="ID" />
                <asp:BoundField HeaderText="TAG/版本名" DataField="tag_name" />
                <asp:BoundField HeaderText="开始时间" DataField="start_time" />
                <asp:BoundField HeaderText="结束时间" DataField="end_time" />
                <asp:TemplateField HeaderText="流程名">
                     <ItemTemplate>
                        <%# DGFormatSex2(int.Parse(Convert.ToString(DataBinder.Eval(Container.DataItem, "flow_id"))))%>
                     </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作类型">
                    <ItemTemplate>
                         <%# DGFormatSex1(Convert.ToString(DataBinder.Eval(Container.DataItem, "process_type")))%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="结果类型">
                    <ItemTemplate>
                         <%# DGFormatSex(Convert.ToString(DataBinder.Eval(Container.DataItem, "result_type")))%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作人">
                     <ItemTemplate>
                        <%# GetOperatePerson(int.Parse(Convert.ToString(DataBinder.Eval(Container.DataItem, "work_id"))))%>
                     </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField EditText="修改" HeaderText="修改" ShowEditButton="True"  ShowDeleteButton="True" />
            </Columns>
        </asp:GridView>
        </td>
         </tr>
         </table>
    </form>
</div>
</body>
</html>
